import * as React from 'react';
import {configure} from 'mobx';
import {counterStore} from './count';
import {tryStore} from './try'
import { localStore } from './local'
// ​这是一个配置
configure({enforceActions: 'always'})
// ​模块化封装
export const stores = {counterStore,tryStore,localStore}
// createContext 这是react的统一封装的方法。类似vue.Use
export const _context = React.createContext(stores)
// ​React.useContext 导出useStores方法 提供使用
export const useStores = () => React.useContext(_context)
